package user_service

import (
    "bird/internal/pkg/cache"
    "bird/internal/pkg/core"
    "bird/internal/pkg/db"
    "bird/internal/pkg/message"
    "go.uber.org/zap"
)

var _ Service = (*service)(nil)

type Service interface {
    i()

    BanUser(ctx core.Context, phone string) (err error)

    RegisterBasic(ctx core.Context, userData *RegisterData) (id int32, err error)

    RegisterDriver(ctx core.Context, userData *RegisterData) (id int32, err error)

    VerifyCode(ctx core.Context, phone string) (vcode string, err error)

    GenerateToken(ctx core.Context, phone, vcode string) error

    RefreshToken(ctx core.Context, accessToken, refreshToken string) error
}

type service struct {
    logger *zap.Logger
    db     db.Repo
    cache  cache.Repo
    sms    message.Repo
}

func New(logger *zap.Logger, db db.Repo, cache cache.Repo, sms message.Repo) Service {
    return &service{
        logger: logger,
        db:     db,
        cache:  cache,
        sms:    sms,
    }
}

func (s *service) i() {}
